import os
import stat


def save_code_file(str_content, file_name):
    if os.path.exists(file_name):
        os.remove(file_name)

    fp = open(file_name, mode='w', encoding='utf8')
    fp.write(str_content)
    fp.close()
